/**
 * @auther jiagnqifan
 * @since 2016-03-31
 */

require('../models/build.js');
var mongoose  = require('mongoose');
var Build = mongoose.model('Build');

/**
 * 获取正在执行的构建（不包括取消的）
 * @param cert_id
 * @param callback
 */
exports.getBuilding = function (callback){
    Build.find({'state':'building'}).populate('config').exec(callback);
};
